<%= form_for @driving_lesson, :url => timeslot_driving_lesson_url(@timeslot) do |f| %>
  <% if @driving_lesson.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@driving_lesson.errors.count, "error") %> prohibited this driving lesson from being saved:</h2>

      <ul>
      <% @driving_lesson.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :topic %><br />
    <%= collection_select(:driving_lesson, :topic, @topics, :id, :name) %>
  </div>
  <div class="field">
    <%= f.label :car %><br />
    <%= collection_select(:driving_lesson, :car, @cars, :id, :display) %>
  </div>
  <div class="field">
    <%= f.label :grade %><br />
    <%= f.select(:grade, options_for_select([[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]], @driving_lesson.grade)) %>
  </div>
  <div class="field">
    <%= f.label :comment %><br />
    <%= f.text_area :comment %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
